0 JBC
↳1 JBCToGraph (⇒, 129 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIDPv1Proof (⇒, 31 ms)
↳6 IDP
↳7 IDPNonInfProof (⇒, 122 ms)
↳8 AND
↳9 IDP
↳10 IDependencyGraphProof (⇔, 0 ms)
↳11 TRUE
↳12 IDP
↳13 IDependencyGraphProof (⇔, 0 ms)
↳14 TRUE
package simple.whileDecr;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
WhileDecr.decrease(args.length);
}
}
package simple.whileDecr;
public class WhileDecr {
// this example does acutally terminate.
public static void decrease(int i) {
while (i > 5) {
i--;
}
}
}
Generated 7 rules for P and 0 rules for R.
P rules:
133_0_decrease_ConstantStackPush(EOS(STATIC_133), i17, i17) → 136_0_decrease_LE(EOS(STATIC_136), i17, i17, 5)
136_0_decrease_LE(EOS(STATIC_136), i31, i31, matching1) → 141_0_decrease_LE(EOS(STATIC_141), i31, i31, 5) | =(matching1, 5)
141_0_decrease_LE(EOS(STATIC_141), i31, i31, matching1) → 145_0_decrease_Inc(EOS(STATIC_145), i31) | &&(>(i31, 5), =(matching1, 5))
145_0_decrease_Inc(EOS(STATIC_145), i31) → 149_0_decrease_JMP(EOS(STATIC_149), +(i31, -1)) | >(i31, 0)
149_0_decrease_JMP(EOS(STATIC_149), i33) → 169_0_decrease_Load(EOS(STATIC_169), i33)
169_0_decrease_Load(EOS(STATIC_169), i33) → 129_0_decrease_Load(EOS(STATIC_129), i33)
129_0_decrease_Load(EOS(STATIC_129), i17) → 133_0_decrease_ConstantStackPush(EOS(STATIC_133), i17, i17)
R rules:
Combined rules. Obtained 1 conditional rules for P and 0 conditional rules for R.
P rules:
133_0_decrease_ConstantStackPush(EOS(STATIC_133), x0, x0) → 133_0_decrease_ConstantStackPush(EOS(STATIC_133), +(x0, -1), +(x0, -1)) | >(x0, 5)
R rules:
Filtered ground terms:
133_0_decrease_ConstantStackPush(x1, x2, x3) → 133_0_decrease_ConstantStackPush(x2, x3)
EOS(x1) → EOS
Cond_133_0_decrease_ConstantStackPush(x1, x2, x3, x4) → Cond_133_0_decrease_ConstantStackPush(x1, x3, x4)
Filtered duplicate args:
133_0_decrease_ConstantStackPush(x1, x2) → 133_0_decrease_ConstantStackPush(x2)
Cond_133_0_decrease_ConstantStackPush(x1, x2, x3) → Cond_133_0_decrease_ConstantStackPush(x1, x3)
Combined rules. Obtained 1 conditional rules for P and 0 conditional rules for R.
P rules:
133_0_decrease_ConstantStackPush(x0) → 133_0_decrease_ConstantStackPush(+(x0, -1)) | >(x0, 5)
R rules:
Finished conversion. Obtained 2 rules for P and 0 rules for R. System has predefined symbols.
P rules:
133_0_DECREASE_CONSTANTSTACKPUSH(x0) → COND_133_0_DECREASE_CONSTANTSTACKPUSH(>(x0, 5), x0)
COND_133_0_DECREASE_CONSTANTSTACKPUSH(TRUE, x0) → 133_0_DECREASE_CONSTANTSTACKPUSH(+(x0, -1))
R rules:
!= | ~ | Neq: (Integer, Integer) -> Boolean |
* | ~ | Mul: (Integer, Integer) -> Integer |
>= | ~ | Ge: (Integer, Integer) -> Boolean |
-1 | ~ | UnaryMinus: (Integer) -> Integer |
| | ~ | Bwor: (Integer, Integer) -> Integer |
/ | ~ | Div: (Integer, Integer) -> Integer |
= | ~ | Eq: (Integer, Integer) -> Boolean |
~ | Bwxor: (Integer, Integer) -> Integer | |
|| | ~ | Lor: (Boolean, Boolean) -> Boolean |
! | ~ | Lnot: (Boolean) -> Boolean |
< | ~ | Lt: (Integer, Integer) -> Boolean |
- | ~ | Sub: (Integer, Integer) -> Integer |
<= | ~ | Le: (Integer, Integer) -> Boolean |
> | ~ | Gt: (Integer, Integer) -> Boolean |
~ | ~ | Bwnot: (Integer) -> Integer |
% | ~ | Mod: (Integer, Integer) -> Integer |
& | ~ | Bwand: (Integer, Integer) -> Integer |
+ | ~ | Add: (Integer, Integer) -> Integer |
&& | ~ | Land: (Boolean, Boolean) -> Boolean |
Integer
(0) -> (1), if (x0[0] > 5 ∧x0[0] →* x0[1])
(1) -> (0), if (x0[1] + -1 →* x0[0])
(1) (>(x0[0], 5)=TRUE∧x0[0]=x0[1] ⇒ 133_0_DECREASE_CONSTANTSTACKPUSH(x0[0])≥NonInfC∧133_0_DECREASE_CONSTANTSTACKPUSH(x0[0])≥COND_133_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])∧(UIncreasing(COND_133_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])), ≥))
(2) (>(x0[0], 5)=TRUE ⇒ 133_0_DECREASE_CONSTANTSTACKPUSH(x0[0])≥NonInfC∧133_0_DECREASE_CONSTANTSTACKPUSH(x0[0])≥COND_133_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])∧(UIncreasing(COND_133_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])), ≥))
(3) (x0[0] + [-6] ≥ 0 ⇒ (UIncreasing(COND_133_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])), ≥)∧[(-1)Bound*bni_8] + [(2)bni_8]x0[0] ≥ 0∧[(-1)bso_9] ≥ 0)
(4) (x0[0] + [-6] ≥ 0 ⇒ (UIncreasing(COND_133_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])), ≥)∧[(-1)Bound*bni_8] + [(2)bni_8]x0[0] ≥ 0∧[(-1)bso_9] ≥ 0)
(5) (x0[0] + [-6] ≥ 0 ⇒ (UIncreasing(COND_133_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])), ≥)∧[(-1)Bound*bni_8] + [(2)bni_8]x0[0] ≥ 0∧[(-1)bso_9] ≥ 0)
(6) (x0[0] ≥ 0 ⇒ (UIncreasing(COND_133_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])), ≥)∧[(-1)Bound*bni_8 + (12)bni_8] + [(2)bni_8]x0[0] ≥ 0∧[(-1)bso_9] ≥ 0)
(7) (COND_133_0_DECREASE_CONSTANTSTACKPUSH(TRUE, x0[1])≥NonInfC∧COND_133_0_DECREASE_CONSTANTSTACKPUSH(TRUE, x0[1])≥133_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))∧(UIncreasing(133_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥))
(8) ((UIncreasing(133_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥)∧[bni_10] = 0∧[2 + (-1)bso_11] ≥ 0)
(9) ((UIncreasing(133_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥)∧[bni_10] = 0∧[2 + (-1)bso_11] ≥ 0)
(10) ((UIncreasing(133_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥)∧[bni_10] = 0∧[2 + (-1)bso_11] ≥ 0)
(11) ((UIncreasing(133_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))), ≥)∧[bni_10] = 0∧0 = 0∧[2 + (-1)bso_11] ≥ 0)
POL(TRUE) = 0
POL(FALSE) = 0
POL(133_0_DECREASE_CONSTANTSTACKPUSH(x1)) = [2]x1
POL(COND_133_0_DECREASE_CONSTANTSTACKPUSH(x1, x2)) = [2]x2
POL(>(x1, x2)) = [-1]
POL(5) = [5]
POL(+(x1, x2)) = x1 + x2
POL(-1) = [-1]
COND_133_0_DECREASE_CONSTANTSTACKPUSH(TRUE, x0[1]) → 133_0_DECREASE_CONSTANTSTACKPUSH(+(x0[1], -1))
133_0_DECREASE_CONSTANTSTACKPUSH(x0[0]) → COND_133_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])
133_0_DECREASE_CONSTANTSTACKPUSH(x0[0]) → COND_133_0_DECREASE_CONSTANTSTACKPUSH(>(x0[0], 5), x0[0])
!= | ~ | Neq: (Integer, Integer) -> Boolean |
* | ~ | Mul: (Integer, Integer) -> Integer |
>= | ~ | Ge: (Integer, Integer) -> Boolean |
-1 | ~ | UnaryMinus: (Integer) -> Integer |
| | ~ | Bwor: (Integer, Integer) -> Integer |
/ | ~ | Div: (Integer, Integer) -> Integer |
= | ~ | Eq: (Integer, Integer) -> Boolean |
~ | Bwxor: (Integer, Integer) -> Integer | |
|| | ~ | Lor: (Boolean, Boolean) -> Boolean |
! | ~ | Lnot: (Boolean) -> Boolean |
< | ~ | Lt: (Integer, Integer) -> Boolean |
- | ~ | Sub: (Integer, Integer) -> Integer |
<= | ~ | Le: (Integer, Integer) -> Boolean |
> | ~ | Gt: (Integer, Integer) -> Boolean |
~ | ~ | Bwnot: (Integer) -> Integer |
% | ~ | Mod: (Integer, Integer) -> Integer |
& | ~ | Bwand: (Integer, Integer) -> Integer |
+ | ~ | Add: (Integer, Integer) -> Integer |
&& | ~ | Land: (Boolean, Boolean) -> Boolean |
Integer
!= | ~ | Neq: (Integer, Integer) -> Boolean |
* | ~ | Mul: (Integer, Integer) -> Integer |
>= | ~ | Ge: (Integer, Integer) -> Boolean |
-1 | ~ | UnaryMinus: (Integer) -> Integer |
| | ~ | Bwor: (Integer, Integer) -> Integer |
/ | ~ | Div: (Integer, Integer) -> Integer |
= | ~ | Eq: (Integer, Integer) -> Boolean |
~ | Bwxor: (Integer, Integer) -> Integer | |
|| | ~ | Lor: (Boolean, Boolean) -> Boolean |
! | ~ | Lnot: (Boolean) -> Boolean |
< | ~ | Lt: (Integer, Integer) -> Boolean |
- | ~ | Sub: (Integer, Integer) -> Integer |
<= | ~ | Le: (Integer, Integer) -> Boolean |
> | ~ | Gt: (Integer, Integer) -> Boolean |
~ | ~ | Bwnot: (Integer) -> Integer |
% | ~ | Mod: (Integer, Integer) -> Integer |
& | ~ | Bwand: (Integer, Integer) -> Integer |
+ | ~ | Add: (Integer, Integer) -> Integer |
&& | ~ | Land: (Boolean, Boolean) -> Boolean |
Integer